﻿@model dynamic

@{
    ViewBag.Title = "title";
}

<h2>title</h2>
<script src="/Resource/uploadify/jquery.uploadify-3.1.js"></script>
<script>
    $("#uploadify").uploadify({
        height: 30,
        swf: '/wTester/js/uploadify/uploadify.swf',
        uploader: '/wTester/ashx/up.ashx',
        width: 120,
        cancelImage: '/wTester/js/uploadify/uploadify-cancel.png',
        buttonText: '选择项目文件',
        auto: false,
        fileTypeExts: '*.xls;*.zip;*.vbs;',
        queueID: 'fileQueue',
        formData: { 'uid': " " },
        removeCompleted: true,
        method: "post",
        queueSizeLimit: '30',
        multi: true,
        //onUploadSuccess: function (file, data, response) { //上传完成时触发（每个文件触发一次）
        //    if (data.length > 1) {
        //        alert(data);
        //    } else {
        //        //$("#previewImage").attr("src", data.substr(2)).hide().fadeIn(2000);
        //    }
        //},
        //'onUploadError': function (file, errorCode, errorMsg, errorString) {//当单个文件上传出错时触发
        //    alert('文件：' + file.name + ' 上传失败: ' + errorString);
        //}
        // 所有文件上传完时
        onQueueComplete: function (stats) {

            $.ajax({
                url: "/wTester/ashx/Subxiangmu.ashx",
                type: "post",
                success: function (data) {
                    if (data == "1") {
                        alert("添加成功");
                        window.location.href = "/wTester/member/member_test.aspx";
                    } else {
                        alert(data);
                    }

                },
            });
        }
    });
    //开始上传图片
    $('#uploadify').uploadify('upload', "*");

</script> 